# -*- coding: utf-8 -*-
# @project: huawang-api20230914
# @file： tmp_726.py
# @Time：2023/7/26 15:40
# @Author：lizhixiong
from time import sleep

from selenium.webdriver.common.by import By

from common.commin.commin import object_left_click, object_send_keys
from common.log.log import log
from po.public_methods import yk_ui_login_backstage

if __name__ == '__main__':
    driver = yk_ui_login_backstage(mode=1)  # 默认远程，1为本地启动浏览器
    driver.get('https://jky.huawangglobal.com/#/shop/goods')
    object_send_keys(driver, (By.XPATH, "//div[@id='pane-first']//input[@placeholder='输入搜索内容']"), 'test')
    object_left_click(driver, (By.XPATH, "//input[@placeholder='搜索类型']"))
    sleep(1)
    object_left_click(driver, (By.XPATH, "/html/body/div[4]/div[1]/div[1]/ul/li/span"))
    # object_left_click(driver, (By.XPATH, "//div[@id='pane-first']//input[@placeholder='商品分类']"))
    # object_left_click(driver, (By.XPATH, "//div[@x-placement='bottom-start']//span[contains(text(),'|-----|-----酱酒')]"))
    object_left_click(driver, (By.XPATH, "//div[@id='pane-first']//span[contains(text(),'搜索')]"))
    sleep(5)
